<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%> 
<%@ include file="../layout/_header.jsp"%>
<body style="padding: 10px; height: 100%; text-align: center;">
	<ipnut type="hidden" id="MenuNo" value="BaseManageEmployees" />
	<div id="mainsearch" style="width: 98%">
		<div class="searchtitle">
			<span>搜索</span><img src="../lib/icons/32X32/searchtool.gif" />
			<div class="togglebtn"></div>
		</div>
		<div class="navline" style="margin-bottom: 4px; margin-top: 4px;"></div>
		<div class="searchbox">
			<form id="formsearch" class="l-form"></form>
		</div>
	</div>
	<div id="maingrid"></div>
	<script type="text/javascript">
      //相对路径
      var rootPath = "../";
      //列表结构
      var grid = $("#maingrid").ligerGrid({
          columns: [
                    { display: "序号", name: "id", width: 120 },  
                    { display: "部门名称", name: "deptname", width: 120 },  
                    { display: "联系电话", name: "telephone", width: 120 },  
                    { display: "地址", name: "address", width: 80 }
                   ], 
                   dataAction: 'server',
                   usePager: true,       //服务器分页
                   pageSize:20,
                   pageParmName:'page.currentPage',
                   pagesizeParmName:'page.pagesize',
                   toolbar: {},
          url: rootPath + 'actions/grid/Grid.action?view=searchDepartment', sortName: 'id', 
          width: '98%', height: '100%',heightDiff:-10, checkbox: false
      });

      //双击事件
      LG.setGridDoubleClick(grid, 'modify');

      //搜索表单应用ligerui样式
      $("#formsearch").ligerForm({
		   fields:[
		   {display:"部门名称",name:"deptname",newline:false,labelWidth:100,width:220,space:30,type:"text",cssClass:"field"} 
		   ],
		   toJSON: JSON2.stringify
	  });

      //增加搜索按钮,并创建事件
      LG.appendSearchButtons("#formsearch", grid);

      function f_reload() {
          grid.loadData();
      }

  </script>
<%@ include file="../layout/_footer.jsp"%>